home *** CD-ROM | disk | FTP | other *** search
- -- card: 9233 from stack: in
- -- bmap block id: 9660
- -- flags: 4000
- -- background id: 7184
- -- name: C,a,b known
- ----- HyperTalk script -----
- on mouseUp
- set numberFormat to <0.000000>
-
- --Calculate Sin C
- get sin(card field "angle C"*(pi/180))
- put it into mem1
- put it into card field "sin C"
-
- --Calculate Cos C
- get cos(card field "angle C"*(pi/180))
- put it into mem2
- put it into card field "cos C"
-
- --Calculate Tan A
- get (card field "side a"*mem1)/ (card field "side b"-card field "side a"*mem2)
- put it into mem3
- put it into card field "tan A"
-
- --Calculate Angle A
- get atan(mem3)*(180/pi)
- put it into mem4
- put it into card field "angle A"
-
- --Calculate Angle B
- get 180-(card field "angle C"+ card field "angle A")
- put it into card field "angle B"
-
- --Calculate Side C
- get sqrt((card field "side a"^2+card field "side b"^2) -2*(card field "side a"*card field "side b"*mem2))
- put it into card field "side c"
-
- --Calculate Area
- get (card field "side a"+card field "side b"+card field "side c")/2
- put it into mem9
- get sqrt(mem9*(mem9-card field "side a")*(mem9-card field "side b") *(mem9-card field "side c"))
- put it into bkgnd field "Area"
-
- --Calculate Perimeter
- get card field "side a"+card field "side b"+card field "side c"
- put it into bkgnd field "Perimeter"
- end mouseUp
-
-
- -- part 1 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=112 top=263 right=280 bottom=240
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side b
-
-
- -- part 2 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=305 top=146 right=163 bottom=433
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side a
-
-
- -- part 3 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=245 top=82 right=101 bottom=373
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle B
-
-
- -- part 4 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=51 top=135 right=154 bottom=184
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: side c
-
-
- -- part 5 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=22 top=215 right=234 bottom=150
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle A
-
-
- -- part 7 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=297 top=215 right=232 bottom=425
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: angle C
-
-
- -- part 8 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=422 top=50 right=62 bottom=482
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: sin C
-
-
- -- part 9 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=422 top=63 right=75 bottom=482
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: cos C
-
-
- -- part 10 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=422 top=76 right=88 bottom=482
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: tan A
-
-
- -- part contents for card part 1
- ----- text -----
- 3
-
- -- part contents for card part 2
- ----- text -----
- 2
-
- -- part contents for card part 7
- ----- text -----
- 104.477513
-
- -- part contents for card part 8
- ----- text -----
- 0.968246
-
- -- part contents for card part 9
- ----- text -----
- -.250000
-
- -- part contents for card part 10
- ----- text -----
- 0.553283
-
- -- part contents for card part 5
- ----- text -----
- 28.955024
-
- -- part contents for card part 3
- ----- text -----
- 46.567463
-
- -- part contents for card part 4
- ----- text -----
- 4.000000
-
- -- part contents for background part 3
- ----- text -----
- 9.000000
-
- -- part contents for background part 5
- ----- text -----
- 2.904738